﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Telerik.WinControls;


namespace Text_Finder
{
    public partial class DoneWIthPreparation : Telerik.WinControls.UI.RadForm
    {
        [DefaultValue(1)]
        public int choise { get; private set; }
        public const int CHOISEDONE = 2;
        public const int CHOISEBACK = 1;
        public const int CHOISENEXT = 3;
        /*
         * 3=start up search right away
         * 2=just close
         * 1=back
         * bliver behandlet af masterwindow til at finde ud af hvad brugeren trykkede på efter der blev valgt forms/vinduer der skulle behandles af oversætteren
        */
        public DoneWIthPreparation()
        {
            InitializeComponent();
        }

        private void BtnDone_Click(object sender, EventArgs e)
        {
            choise = CHOISEDONE;
            Hide();
        }

        private void BtnNext_Click(object sender, EventArgs e)
        {
            choise = CHOISENEXT;
            Hide();
        }

        protected override void OnClosing(CancelEventArgs e)
        {
            base.OnClosing(e);
            if (choise == 0)
            {
                choise = CHOISEDONE;
            }
        }

        public void ResetChoise()
        {
            choise = 0;
        }

        private void BtnBack_Click(object sender, EventArgs e)
        {
            choise = CHOISEBACK;
            Hide();
        }
    }
}
